//#pragma once
//class RSA_
//{
//public:
//	RSA_(void);
//	~RSA_(void);
//functions:
	/*void handleRSA(char*,WLANHeader*);
	char* encrypt(char*,WLANHeader*);
	char* decrypt(char*,WLANHeader*);
	unsigned int genKeys(WLANHeader*);*/

#ifndef RSA__HPP
#define RSA__HPP

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <vector>
#include "cryptoUtil.h"
#include <sstream>
#include <iostream>
#include <cstdlib>
#include "wlan.hpp"
#include "ElGamal.hpp"

#define RSA_INIT				1
#define RSA_PUBLICKEY				2
#define RSA_SEND				3



void handleRSA(PCryptoPacket, WLANHeader * );
unsigned int encrypt(char*,unsigned int, unsigned int);
unsigned int decrypt(char*,unsigned int, unsigned int);
unsigned int exponentiationBySquaring(unsigned int, unsigned int, unsigned int);
unsigned int modularExponentiation(unsigned int, unsigned int, unsigned int);
void genKeys(WLANAddr *, double);
unsigned int genCoPrime(int);
unsigned int genPrimeNum(void);
int gcd(int,int);
int is_Prime(int);
int findInverse(unsigned int,unsigned int);
void initiateRSA();
int checkRSATable (WLANAddr *); 
void printRSATable (); 
void sendRSACryptoPacket( PCryptoPacket, WLANAddr * );
void popFromRSATable(int);
//variables

//};
#endif
